/*
 * Funny Language - a free style programming language.
 * Copyright (C) 2015 by fanguangping (fanguangping@163.com)
 * vec.h
 */

#ifndef FUNNY_SCHEME_VECTOR_H
#define FUNNY_SCHEME_VECTOR_H

#include "../ds/datastructure.h"

DEFINE_OPERATOR( vector     );
DEFINE_OPERATOR( makevector );
DEFINE_OPERATOR( veclen     );
DEFINE_OPERATOR( vecref     );
DEFINE_OPERATOR( vecset     );
INIT_OPERATORS( vector );

Cell* make_vector(Scheme *sc, int len);
Cell* get_vector_item(Cell* vec, int index);
Cell* set_vector_item(Cell* vec, int index, Cell* a);
void fill_vector(Cell* vec, Cell* fill_obj);
Cell** get_all_vector_items(Cell* vec);

#endif //FUNNY_SCHEME_VECTOR_H
